package com.wll.design.观察者.springboot.event;

import org.springframework.context.ApplicationEvent;

import java.time.Clock;

/**
 * @ClassName: CustomEvent.java
 * @author: wanglulu
 * @version: 1.0.0
 * @Description: 编写事件源
 * @createTime: 2021/11/25 15:56
 */
public class CustomEvent extends ApplicationEvent {

    private MessageEntity messageEntity;

    public CustomEvent(Object source) {
        super(source);
    }

    public CustomEvent(Object source, MessageEntity messageEntity) {
        super(source);
        this.messageEntity = messageEntity;
    }

    public MessageEntity getMessageEntity() {
        return messageEntity;
    }
}
